Skip to content

Comments

test_runner: print coverage and diagnostics with dot reporter#61891

Open
madkate42 wants to merge 2 commits intonodejs:mainfrom
madkate42:fix-dot-reporter-coverage
Open

test_runner: print coverage and diagnostics with dot reporter#61891
madkate42 wants to merge 2 commits intonodejs:mainfrom
madkate42:fix-dot-reporter-coverage

Conversation

@madkate42
Copy link

@madkate42 madkate42 commented Feb 19, 2026

Summary

When using the dot reporter with coverage thresholds, coverage failure messages and the coverage report were not displayed. The dot reporter only handled test:pass and test:fail events, ignoring test:diagnostic and test:coverage events.

This change adds handlers for these events, displaying:

  • Diagnostic messages (including coverage threshold errors)
  • The coverage report table

after the test dots complete.

Fixes: #60884
Refs: #52655

Test plan

  • Added tests in test/parallel/test-runner-coverage-thresholds.js for dot reporter coverage failures
  • Existing dot reporter tests continue to pass

   diagnostics with dot reporter
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Feb 19, 2026
@madkate42 madkate42 closed this Feb 19, 2026
@madkate42 madkate42 deleted the fix-dot-reporter-coverage branch February 19, 2026 21:15
@madkate42 madkate42 restored the fix-dot-reporter-coverage branch February 19, 2026 21:29
@madkate42 madkate42 reopened this Feb 19, 2026
fixture,
]);

const stdout = result.stdout.toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a snapshot test too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch, thank you, added in this commit.
let me know if this could be improved!

@madkate42 madkate42 requested a review from pmarchini February 20, 2026 23:07
@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.77%. Comparing base (5a8f845) to head (3be8bad).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/test_runner/reporter/dot.js 71.42% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61891      +/-   ##
==========================================
- Coverage   91.70%   89.77%   -1.93%     
==========================================
  Files         337      674     +337     
  Lines      140026   204906   +64880     
  Branches    21745    39385   +17640     
==========================================
+ Hits       128410   183964   +55554     
- Misses      11393    13233    +1840     
- Partials      223     7709    +7486     
Files with missing lines Coverage Δ
lib/internal/test_runner/reporter/dot.js 90.00% <71.42%> (-10.00%) ⬇️

... and 458 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_runner: print failed coverage reports with dot runner

3 participants